<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="description" content="" />
    <meta name="author" content="ChongMing" />
    <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-touch-fullscreen" content="yes">
    <meta name="full-screen" content="yes">
    <meta name="screen-orientation" content="portrait">
    <meta name="x5-fullscreen" content="true">
    <meta name="360-fullscreen" content="true">
    <title>帮我推荐</title>
</head>
<link rel="stylesheet" href="../css/framework7.ios.min.css">
<link rel="stylesheet" href="../css/framework7.ios.colors.min.css">
<link rel="stylesheet" href="../css/my-app.css">
<link rel="stylesheet" href="../css/reset.css">
<link rel="stylesheet" href="css/consultation.css">
<link rel="stylesheet" type="text/css" href="css/swipeslider.css">
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/jquery.mobile-1.4.3.js"></script>
<script type="text/javascript" src="../js/framework7.min.js"></script>
<script type="text/javascript" src="../js/my-app.js"></script>
<script type="text/javascript" src="js/swipeslider.min.js"></script>
<script type="text/javascript" src="js/consultation.js"></script>
<script>
$(function(){
    //    点击上传图片
    var $container = $('.groupconsultationh-datail .top-form .pictures .up-button .input-file');
    var up_pic_url = []
    $container.on('change','input[name="photoFile"]',function(e){
        var $this = $(this),
                file = null,
                freader = null;
        for(var i=0;i<e.target.files.length;i++){
            file = e.target.files.item(i);
            //不是图片 跳出这一次循环
            if(!(/^image\/.*$/i.test(file.type)))
            {
                continue;
            }
            //实例化FileReader API
            freader = new FileReader();
            freader.readAsDataURL(file);
            freader.onload = function(e){
                $('.groupconsultationh-datail .top-form .upload-pic p').hide()
//                var len = $('.showimg ul li').length + 1
//                $('.groupconsultationh-datail .top-form .upload-pic .up-icon').attr('src',e.target.result)
                $('.groupconsultationh-datail .top-form .pictures .append-pic').append('<div class="list"><img class="tu" src="' + e.target.result + '"><img class="del" src="images/icon9.png">')
                //$('.showimg ul li .cha').click(function(){
                //    $(this).parent().remove()
                //});
                up_pic_url.push(e.target.result)
                if($('.groupconsultationh-datail .top-form .pictures .append-pic .list').length>4){
                    $('.groupconsultationh-datail .top-form .pictures .up-button').hide();
                }else{
                    $('.groupconsultationh-datail .top-form .pictures .up-button').show();
                }
            }
        }
    });
    //    推荐会诊点击进行会诊确认
    $('.groupconsultationh-datail .conduct-button .confirm').click(function(){
        var textarea_val =  $('.groupconsultationh-datail .top-form .situation textarea').val();
        var name = $ ('.recommend-bot .form .name input').val();
        var phone = $ ('.recommend-bot .form .phone input').val();
        var code = $('.recommend-bot .form .code input').val();
        var case_id = $('.groupconsultationh-datail .top-form .medicalrecord .p-name').data('case_id');
        if(textarea_val==''){
            consultationinterface.layer('请详细描述当前病情');
        }else if(name==''){
            consultationinterface.layer('请输入患者姓名');
        }else if(phone==''){
            consultationinterface.layer('请输入患者手机号');
        }else if(!obj.phone.test(phone)){
            consultationinterface.layer('手机号格式不正确');
        }else{
            $('.payment-layer').show();
            $('.groupconsultationh-datail .payment-layer .con').animate({'bottom':0},300);
            consultationinterface.diagnosis2(1,textarea_val,up_pic_url[0],up_pic_url[1],up_pic_url[2],up_pic_url[3],up_pic_url[4],name,phone,1);
        }
    });
//    病历列表
//    consultationinterface.medical_list(2457);
});
</script>
<style>
    .recommend-bot{
        width:100%;
        height:auto;
        background: #fff;
        overflow: hidden;
        margin-top: 10px;
    }
    .recommend-bot .form{
        width:100%;
        height:auto;
        background: #fff;
        overflow: hidden;
    }
    .recommend-bot .form .public{
        width: 100%;
        height: 45px;
        border-bottom: 1px solid #e1e1e1;
    }
    .recommend-bot .form .public label{
        line-height: 44px;
        color: #888;
        font-size: 14px;
        margin-left: 10px;
        float: left;
    }
    .recommend-bot .form .public input{
        width: 60%;
        font-size: 14px;
        color: #333;
        margin-top: 13px;
        border: none;
    }
    .recommend-bot .form .code{
        width: 100%;
        height: 45px;
        overflow: hidden;
    }
    .recommend-bot .form .code input{
        width: 40%;
        font-size: 14px;
        color: #333;
        margin-top: 13px;
        border: none;
        float: left;
        margin-left: 10px;
    }
    .recommend-bot .form .code button{
        float: left;
        height: 35px;
        width: 120px;
        font-size: 14px;
        font-family: '微软雅黑';
        border:none;
        background: #c9c9c9;
        color: #fff;
        border-radius: 5px;
        margin-top: 5px;
        margin-left: 10px;
    }
</style>
<body style=" background: #ebebeb; max-width:640px; margin: auto;-webkit-overflow-scrolling: touch;overflow: scroll;">
<div class="groupconsultationh-datail">
    <div class="top-form">
        <!--<div class="medicalrecord">-->
            <!--<label>患者病历：</label>-->
            <!--<p class="p-name">默认患者病历</p>-->
            <!--<img src="images/icon7.png">-->
        <!--</div>-->
        <div class="situation">
            <textarea placeholder="请详细描述您当前的病情,如不方便上传相关病例资料，待预约成功之后可配合平台相关工作人员进行资料提交或者进行邮递等方式,具体情况依据患者自身进行协调。易康将确保您的隐私安全"></textarea>
        </div>
        <div class="upload-pic">
            <div class="pictures">
                <div class="append-pic">

                </div>
                <div class="up-button">
                    <img class="up-icon" src="images/icon8.png">
                    <div class="input-file relative">
                        <input class="absolute" type="file" id="photoFile" name="photoFile">
                    </div>
                    <input type="hidden" id="blessingpic" name="blessingpic">
                </div>
                <p>如有病历、检查、化验单、疾病部位等<br/>可以拍照上传</p>
            </div>
        </div>
    </div>
    <div class="recommend-bot">
        <div class="form">
            <div class="name public">
                <label>患者姓名：</label>
                <input type="text" placeholder="请输入患者姓名">
            </div>
            <div class="phone public">
                <label>手机号码：</label>
                <input type="text" placeholder="请输入患者手机号">
            </div>
            <!--<div class="code">-->
                <!--<input type="number" placeholder="请输入手机验证码">-->
                <!--<button>获取验证码</button>-->
            <!--</div>-->
        </div>
    </div>
    <div class="conduct-button" style=" margin-top: 20px; border: none; background: none;">
        <button class="confirm">确认</button>
    </div>
    <div class="medicalrecord-layer">
        <div class="con">

        </div>
    </div>
    <div class="payment-layer">
        <div class="topmask"></div>
        <div class="con">
            <div class="name">
                <p class="p1">姓名：</p>
                <p class="p2">张三李四</p>
            </div>
            <div class="phone">
                <p class="p1">联系电话：</p>
                <p class="p2">156 0000 1234</p>
            </div>
            <div class="money-num">
                <p class="p1">实付金额</p>
                <p class="p2">￥ 1499</p>
            </div>
            <div class="pay-mode">
                <p class="p1">支付方式</p>
                <div class="wechat public">
                    <img class="icon-wechat img" src="images/icon12.png">
                    <img class="radio" src="images/icon10.png">
                </div>
                <div class="alipay public">
                    <img class="icon-alipay img" src="images/icon13.png">
                    <img class="radio" src="images/icon10.png">
                </div>
            </div>
            <span class="contact-time">推荐成功后2小时（工作时间段）可见联系电话</span>
            <button class="button-pay">支付</button>
        </div>
    </div>
</div>

</body>
</html>